<?php
/**
 * @copyright :efy.com.vn - 11/2010 
 * @see : Nguoi tao: NGHIAT
 * */
class mtl_modUser extends Efy_DB_Connection {		
	public function eCSNetUserUpdate($arrParameter){
		$psSql = "Exec eCS_NetUserUpdate  ";	
		$psSql .= "'"  . $arrParameter['PK_NET_ID'] . "'";
		$psSql .= ",'" . $arrParameter['C_FULLNAME'] . "'";
		$psSql .= ",'" . $arrParameter['C_USERNAME'] . "'";
		$psSql .= ",'" . $arrParameter['C_PASSWORD'] . "'";
		$psSql .= ",'" . $arrParameter['C_EMAIL'] . "'";
		$psSql .= ",'" . $arrParameter['C_ID_CARD'] . "'";;			
		$psSql .= ",'" . $arrParameter['C_CREATED_DATE'] . "'";
		$psSql .= ",'" . $arrParameter['C_XML_DATA'] . "'";
		//Thuc thi lenh SQL		
		//echo $psSql; exit;
		try {			
			$arrResult = $this->adodbExecSqlString($psSql) ; 
		}catch (Exception $e){
			echo $e->getMessage();
		};
		return $arrResult;
	}
	public function eCSNetUpdatePass($userid,$sNewpass){
		$psSql = "Exec eCS_NetUpdatePass ";
		$psSql .= "'"  . $userid . "'";
		$psSql .= ",'"  . $sNewpass . "'";
		//echo  "<br>". $psSql . "<br>"; 
		//exit;
		try{
			$arrResult = $this->adodbExecSqlString($psSql);
		}catch (Exception $e){
			echo $e->getMessage();
		};
		return $arrResult;
	}
	/**
	 * @author : KHOINV
	 * @since : 11/05/2011
	 * @see : Lay danh sach loai bao cao
	 * @param :
	 * 			$sUserName: user dang nhap
	 * 			$sPassWord: password dang nhap
	 * @return : 
	 * 			$arrResult 
	 * 			
	 * */
	public function eCSNetCheckLogin($sUserName,$sPassWord){			
		$sql = "Exec eCS_NetCheckLogin  ";
		$sql .= "'" . $sUserName . "'";
		$sql .= ",'" . $sPassWord . "'";		
		//echo $sql ; exit();
		// thuc hien cap nhat du lieu vao csdl
		try {			
			$arrResult = $this->adodbExecSqlString($sql) ; 			
			
		}catch (Exception $e){
			echo $e->getMessage();
		};				
		return $arrResult;	
		//var_dump($arrResult) . 'du lieu ket xuat tu database';
	}

	public function eCSNetCheckUserName($sUserName){			
		$sql = "Exec eCS_NetCheckUserName  ";
		$sql .= "'" . $sUserName . "'";;
		// echo $sql; die;
		try {			
			$arrResult = $this->adodbExecSqlString($sql) ; 			
			
		}catch (Exception $e){
			echo $e->getMessage();
		};				
		return $arrResult;
	}	
}	
?>
